package com.xydtech.system.service.impl;

import com.xydtech.system.domain.SysLoanConfiguration;
import com.xydtech.system.mapper.SysLoanConfigurationMapper;
import com.xydtech.system.service.ISysLoanConfigurationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <dd>描述: ~ 贷款计算器参数配置Service业务层处理</dd>
 * <dd>创建时间：  16:41 2024/1/20</dd>
 * <dd>创建人： yuzhiguo</dd>
 * <dt>版本历史: </dt>
 * Date         Author         Version     Description
 * ------------------------------------------------------------------
 * 2024/1/20     yuzhiguo         1.0        1.0 Version
 */
@Service
public class SysLoanConfigurationServiceImpl implements ISysLoanConfigurationService {

    @Autowired
    private SysLoanConfigurationMapper sysLoanConfigurationMapper;

    /**
     * 根据贷款计算器信息表id获取贷款计算器参数配置对象
     * @param loanId
     * @return
     */
    @Override
    public SysLoanConfiguration selectSysLoanConfigurationByLoanId(String loanId) {
        return sysLoanConfigurationMapper.selectSysLoanConfigurationByLoanId(loanId);
    }

    /**
     * 修改保存额度计算配置页
     * @param sysLoanConfiguration
     */
    @Override
    public int editLoanConfiguration(SysLoanConfiguration sysLoanConfiguration) {
        return sysLoanConfigurationMapper.editLoanConfiguration(sysLoanConfiguration);
    }
}
